<?php

namespace app\admin\validate;

use think\Validate;

class ClassHour extends Validate
{
    /**
     * 验证规则
     */
    protected $rule = [
        'num' => 'integer|gt:0',
        'remarks' => 'require|max:255',
    ];

    /**
     * 提示消息
     */
    protected $message = [
        'num.integer' => '次数需要是整数',
        'num.gt' => '次数需要大于0',
        'remarks.require' => '备注不能为空',
        'remarks.max' => '备注填入过长',
    ];

    /**
     * 字段描述
     */
    protected $field = [
    ];

    /**
     * 验证场景
     */
    protected $scene = [
        'add'  => ['num', 'remarks'],
        'edit' => ['num', 'remarks'],
    ];
    
}
